package com.bjdd.jdy.entity;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/5/10.
 */

public class DealRecord {

    /**
     * carrierAccountId : 1
     * money : 47.27
     * afterMoney : 47.27
     * carrierId : 2
     * positive : true
     * msg : 完成订单
     * createTime : 1494467609000
     */

    private int carrierAccountId;
    private double money;
    private double afterMoney;
    private int carrierId;
    private boolean positive;
    private String msg;
    private long createTime;

    public static DealRecord objectFromData(String str) {

        return new Gson().fromJson(str, DealRecord.class);
    }

    public static List<DealRecord> arrayDealRecordFromData(String str) {

        Type listType = new TypeToken<ArrayList<DealRecord>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getCarrierAccountId() {
        return carrierAccountId;
    }

    public void setCarrierAccountId(int carrierAccountId) {
        this.carrierAccountId = carrierAccountId;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public double getAfterMoney() {
        return afterMoney;
    }

    public void setAfterMoney(double afterMoney) {
        this.afterMoney = afterMoney;
    }

    public int getCarrierId() {
        return carrierId;
    }

    public void setCarrierId(int carrierId) {
        this.carrierId = carrierId;
    }

    public boolean isPositive() {
        return positive;
    }

    public void setPositive(boolean positive) {
        this.positive = positive;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }
}
